package cn.cdeden.knowledge.domain;

import cn.cdeden.knowledge.domain.dto.EnterpriseConfigDto;
import cn.cdeden.knowledge.domain.dto.FilesAttentionDto;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
//import io.swagger.annotations.ApiModelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
* @author GW
* @date 2024-08-06
*/
@Data
@AutoMappers({@AutoMapper(target = EnterpriseConfigDto.class)})
@TableName("enterprise_config")
public class EnterpriseConfig {
    private static final long serialVersionUID = 1L;

//    @ApiModelProperty(value = "代码")
    @TableId(type= IdType.ASSIGN_ID)
    private String code;

//    @ApiModelProperty(value = "名称")
    private String name;

//    @ApiModelProperty(value = "值")
    private String value;

//    @ApiModelProperty(value = "描述")
    private String description;

    public void copyFrom(EnterpriseConfig source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
